var mysql      = require('mysql');
//这里改成自己的配置
var connection = mysql.createConnection({
    host     : '192.168.22.37',
    user     : 'points',
    password : 'HFQF1234',
    database : 'ocr_table',
    charset  : 'utf8'
});
 
connection.connect();

var execSql = async (sql)=>{
    return  await  new Promise((resolve, reject) => {
        connection.query(sql,function (err,result) {
                if(err){
                    resolve(0)
                }else {
                    resolve(result)
                }
        })
    })
}
module.exports ={
    execSql:execSql,
}